package com.song.mall.cart.service;

import com.song.mall.cart.vo.Cart;
import com.song.mall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author 宋超
 * HP - the login name of the current user.
 * 2021/10/6 - the current system date.
 * 20:47 - the current system time.
 */
public interface CartService {

    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;


    Cart getCart() throws ExecutionException, InterruptedException;


    CartItem getCartItem(Long skuId);

    void clearCart(String cartKey);

    void checkItem(Long skuId, Integer check);

    void changeItemCount(Long skuId, Integer num);

    void deleteItem(Long skuId);


    List<CartItem> getUserCartItems();
}
